package com.songVersion.model;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class ThumbnailCache
{
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent
	private String url;

	@Persistent
	private int width;

	@Persistent
	private int height;
	
	public ThumbnailCache()
	{
		super();
	}
	
	public ThumbnailCache(Thumbnail t)
	{
		super();
		this.setHeight(t.getHeight());
		this.setKey(t.getKey());
		this.setUrl(t.getUrl());
		this.setWidth(t.getWidth());
		
	}
	
	public ThumbnailCache(ThumbnailCache t)
	{
		super();
		this.setHeight(t.getHeight());
		this.setKey(t.getKey());
		this.setUrl(t.getUrl());
		this.setWidth(t.getWidth());
		
	}
	
	public Key getKey()
	{
		return key;
	}

	public void setKey(Key key)
	{
		this.key = key;
	}

	public String getUrl()
	{
		return url;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

	public int getWidth()
	{
		return width;
	}

	public void setWidth(int width)
	{
		this.width = width;
	}

	public int getHeight()
	{
		return height;
	}

	public void setHeight(int height)
	{
		this.height = height;
	}
}
